<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	template="/WEB-INF/layouts/standard.xhtml" 
	xmlns:a4j="http://richfaces.org/a4j" 
	xmlns:rich="http://richfaces.org/rich"
	xmlns:bf="http://www.bssmanager.com/jsf" 
	xmlns:c="http://java.sun.com/jstl/core">

	<ui:define name="formheader">
		<h2>My Profile</h2>
	</ui:define>
	
	<ui:define name="formGlobal">
		<bf:dateSelector controller="#{userController}" date="date" ajaxUpdate="false"/>
	</ui:define>

	<ui:define name="content">

		<h:messages errorClass="errors" style="color:#ff1111"/>
		<c:set var="controller" value="${userController}"/>

		<h:form id="userForm">

			<h:panelGrid columns="1" width="100%">
				<rich:panel style="border:0">
					<f:facet name="header">
						<h:outputText value="My Profile"/>
					</f:facet>	
					<h:panelGrid columns="2" >
						<h:outputLabel value="User Name:" />
						<h:inputText  value="#{controller.model.username}" />
						<h:outputLabel value="Name:" />
						<h:inputText  value="#{controller.model.name}" />
						<h:outputLabel value="Password:" />
						<h:inputSecret redisplay="true"  value="#{controller.model.password}" />
						<h:outputLabel value="Confirm Password:" />
						<h:inputSecret  redisplay="true" value="#{controller.password}" />
						<h:outputLabel value="Email:" />
						<h:inputText  value="#{controller.model.email}" />	
						<h:outputText value="Skin:" />
	            		<rich:comboBox  value="#{preferences.skin}" suggestionValues="#{skinFactory.skins}"
											enableManualInput="false"
											width="100">
																					
						</rich:comboBox>					
					</h:panelGrid>
					<h:panelGroup>
						<h:commandButton action="#{controller.update}" value="Update" />
						<rich:spacer width="10px"/>
						<h:commandButton id="cancel" value="Cancel"  onclick="selectPage('admission.jsf');return false;" />
					</h:panelGroup>
				</rich:panel>														
			</h:panelGrid>			
		</h:form>
	</ui:define>
</ui:composition>